#@layout("角色授权")
#define css()
	<style>
        .layui-input-block{
            margin-left: 20px;
            margin-right: 20px;
            margin-bottom: 70px;
        }
        .timo-compile .timo-finally{
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            padding-bottom: 14px;
            margin-bottom: 0;
            background-color: #ffffff;
        }
    </style>
#end
#define main()
<body>
<div class="layui-form timo-compile">
    <form action="#(ctxAd)/user/role">
        <input type="hidden" name="id" value="#(id ??)"/>
        <div class="layui-form-item">
            <div class="layui-input-block">
            	#for(item : roleList)
                <input type="checkbox" name="roleId" title="#(item.roleName)" value="#(item.id)"  #if(item.description=='auth:true') checked="checked" #end lay-skin="primary" />
                #end
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit" lay-submit lay-filter="ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
</body>
#end